04. Creating Historical Returns
AI For Trading C1 L1 A04 Creating Historical Returns V3
Leveraging Finance APIs for Data-Driven Strategies
Key Concepts:
Historical Data Access:
- Utilize Yahoo Finance API for seamless acquisition of historical market data.
- Gain programmatic access to crucial financial metrics: open, high, low, close prices, and trading volume.
Real-Time Data Integration:
- Essential for live trading and prompt decision-making.
- Ensures trading models remain current without manual updates.
Data Preparation:
Importance of Clean Data:
- Transition raw data into actionable insights.
- "Garbage in, garbage out"—emphasizes the need for data integrity.
Normalization Techniques:
- Utilize percentage changes to compare stock movements across different price ranges.
- Essential for machine learning models to interpret data accurately.
Implementing Analysis Tools:
Calculating Returns:
- Develop and reuse functions to compute stock returns.
- Understand both forward and historical returns for investment decisions.
Strategic Application:
- Analyze stock performance over time.
- Drive informed and strategic trading decisions based on robust data analysis.
Next Steps:
- Continue applying learned concepts to practical data manipulation and trading strategies.
Objective:
- Build strong foundations for practical analysis in algorithmic trading models.
SOLUTION:
We shifted our forward returns by 1 step to align the returns with the corresponding period for predictive analysis, ensuring that each return is associated with the price data that would have been known before the return was realized.SOLUTION:
- We wanted to standardize the data to allow comparison between stocks.
- Our ML models typically perform better when our data is standardized.